// 用户第三方Token表

import { Entity, PrimaryGeneratedColumn, Column, PrimaryColumn } from 'typeorm';


@Entity()
export class BranchAccount {

    @PrimaryColumn({
        type: 'varchar',
        length: '255'
    })
    userId!: string;

    @PrimaryColumn({
        type: 'varchar',
        length: '255'
    })
    brand!: string;

    @Column({
        type: 'varchar',
        length: '255'
    })
    token!: string;

    @Column({
        type: 'int'
    })
    expiresInHour!: number;

    @Column({
        type: 'timestamp' // 使用 timestamp 类型
    })
    expiresAt!: Date; // 将类型改为 Date
}
